Problems with tag O(nlogn) ~ O(n^2)